home *** CD-ROM | disk | FTP | other *** search
- unit IvDemoD;
-
- {$I IVMULTI.INC}
-
- interface
-
- uses
- {$IFDEF WIN32}
- Windows,
- {$ELSE}
- WinTypes, WinProcs,
- {$ENDIF}
- Classes, Graphics, Forms, Controls, Buttons, StdCtrls, ExtCtrls;
-
- type
- TIvDemoDialog = class(TForm)
- Panel1: TPanel;
- HeaderLabel: TLabel;
- InfoLabel: TLabel;
- CompanyLabel: TLabel;
- AddressLabel: TLabel;
- CityLabel: TLabel;
- CountryLabel: TLabel;
- PhoneLabel: TLabel;
- FaxLabel: TLabel;
- EmailLabel: TLabel;
- PhoneValue: TLabel;
- FaxValue: TLabel;
- EmailValue: TLabel;
- CreditCardLabel: TLabel;
- WWWLabel: TLabel;
- WWWValue: TLabel;
- OKButton: TButton;
- InternationalLabel: TLabel;
- InternationalValue: TLabel;
- DealerLabel: TLabel;
-
- public
- constructor CreateValue(owner: TComponent; const key: String);
- end;
-
- implementation
-
- {$R *.DFM}
-
- uses
- {$IFDEF WIN32}
- Registry,
- {$ELSE}
- IniFiles,
- {$ENDIF}
- IvCommon, IvDictio;
-
- constructor TIvDemoDialog.CreateValue(owner: TComponent; const key: String);
- var
- vendor: TIvVendor;
- {$IFDEF WIN32}
- registry: TRegistry;
- {$ELSE}
- iniFile: TIniFile;
- {$ENDIF}
- begin
- inherited Create(owner);
-
- { Gets the vendor }
-
- vendor := ivveInnoview;
- {$IFDEF WIN32}
- registry := TRegistry.Create;
- try
- registry.RootKey := HKEY_LOCAL_MACHINE;
- if registry.OpenKey(key, False) and registry.KeyExists(VENDOR_C) then
- vendor := TIvVendor(registry.ReadInteger(VENDOR_C));
- except
- end;
- registry.Free;
- {$ELSE}
- iniFile := TIniFile.Create(INI_FILE_C);
- try
- vendor := TIvVendor(iniFile.ReadInteger(SECTION_C, VENDOR_C, 0));
- except
- end;
- iniFile.Free;
- {$ENDIF}
-
- case vendor of
- ivveZac:
- begin
- InfoLabel.Caption := Translate('ZAC Ordering Information:');
- CompanyLabel.Caption := 'ZAC Catalogs';
- AddressLabel.Caption := '1090 Kapp Drive';
- CityLabel.Caption := Translate('Clearwater, FL 34625');
- CountryLabel.Caption := '';
- PhoneValue.Caption := Translate('1-800-GO-DELPHI');
- InternationalValue.Caption := Translate('813-298-1181');
- FaxValue.Caption := Translate('813-461-5808');
- EmailLabel.Caption := Translate('Internet:');
- EmailValue.Caption := 'sales@zaccatalog.com';
- WWWValue.Caption := 'http://www.zaccatalog.com';
- CreditCardLabel.Caption := Translate('ZAC accepts Visa, MasterCard, American Express, Discover, Check, and Money Order');
- DealerLabel.Caption := '';
- end;
- else
- PhoneLabel.Caption := '';
- PhoneValue.Caption := '';
- InternationalLabel.Caption := Translate('Phone:');
- end;
- end;
-
- end.
-